﻿using System.Web;
using CooliteExamples.Code.DAL;
using CooliteExamples.Core.Extensions;
using CooliteExamples.Web.Code;

namespace CooliteExamples.Web.Handlers.Book
{
		/// <summary>
		/// Summary description for $codebehindclassname$
		/// </summary>
		public class GetBooksForAuthor : HandlerBase
		{

				public override void ProcessRequest(HttpContext context)
				{
						int authorId = context.Request[Core.Constants.AUTHOR_ID_PARAM_NAME].AsInt(0);
						var asr = new AjaxStoreResult(BookDal.GetBooksForAuthor(authorId));
						asr.ExecuteResult(context);
				}
		}
}
